package com.sdkj.Entity.admin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sdkj.Entity.BaseEntity;

@Entity
@Table(name="admin_module")
public class AdminModule extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String name; 
	private String tohref;
	private String icoUrl;
	private AdminModule parent;
	private int sortNo;
	
	public void setName(String name) {
		this.name = name;
	}
	public void setTohref(String tohref) {
		this.tohref = tohref;
	}
	public void setIcoUrl(String icoUrl) {
		this.icoUrl = icoUrl;
	}
	public void setParent(AdminModule parent) {
		this.parent = parent;
	}
	public void setSortNo(int sortNo) {
		this.sortNo = sortNo;
	}
	@Column(length=20)
	public String getName() {
		return name;
	}
	@Column(length=50)
	public String getTohref() {
		return tohref;
	}
	@Column(length=50)
	public String getIcoUrl() {
		return icoUrl;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "parent")
	public AdminModule getParent() {
		return parent;
	}
	@Column
	public int getSortNo() {
		return sortNo;
	}
	
	
	
	
}
